﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DB_NH.DB_Map.ywxt.ProjectFinanceRecord
{
    using NHibernate;
    using NHibernate.Mapping.ByCode;
    using NHibernate.Mapping.ByCode.Conformist;

    using DB_NH.DB_Model.ywxt.ProjectFinanceRecord;

    /// <summary>
    /// 费用详细记录映射类
    /// </summary>
    public class FinanceFWF_Map : ClassMapping<FinanceFWF>
    {
        public FinanceFWF_Map()
        {
            //映射ID
            Id(x => x.recId, map =>
            {
                map.Column("rec_id");
                map.Length(40);
            });

            Property(x => x.IsValid, map =>
            {
                map.Column("is_valid");
            });

            Property(x => x.CreateDate, map =>
            {
                map.Column("create_date");
            });

            Property(x => x.recDate, map =>
            {
                map.Column("rec_date");
            });

            ManyToOne(x => x.opUser, map =>
            {
                map.Column("op_user_id");
            });

            ManyToOne(x => x.pe, map =>
            {
                map.Column("pe_id");
            });

            Table("t_finance_fwf");

            //SchemaAction(NHibernate.Mapping.ByCode.SchemaAction.None);
        }
    }
}
